package com.pan.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pan.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface LoginRegisterDao extends BaseMapper<User> {

    @Select("select * from tbl_user where `username` = #{username} and `password` = #{password}")
    User login(String username, String password);

    @Select("select * from tbl_user where `username` = #{username}")
    User selectByUsername(String username);

    @Select("select * from tbl_user where `name` = #{name}")
    User selectByName(String name);

    @Select("select * from tbl_user where `email` = #{email}")
    User selectByEmail(String email);




}
